// 对 api 进行统一管理
import requester from './request'

export const reqAttractionList = () =>
    requester({
        url: '/attraction/list',
        method: 'post',
        data: {
            current: 2,
            size: 8
        }
    });
export const reqAddAttraction = (data) =>
    requester({
        url: '/attraction/add',
        method: 'post',
        data
    });
export const reqRecommendAttraction = (data) =>
    requester({
        url: '/attraction/recommend',
        method: 'post',
        data
    });
export const reqNewsList = () =>
    requester({
        url: '/news/list',
        method: 'post',
        data: {
            current: 2,
            size: 8
        }
    });
export const reqRecommendNews = (data) =>
    requester({
        url: '/news/recommend',
        method: 'post',
        data
    });
export const reqRegisterUser = (data) =>
    requester({
        url: '/user/register',
        method: 'post',
        data
    });

export const reqLoginUser = (data) =>
    requester({
        url: '/user/login',
        method: 'post',
        data
    });

export const reqGetUser = (data) =>
    requester({
        url: '/user/profile',
        method: 'post',
        data
    });

export const reqModifyUser = (data) =>
    requester({
        url: '/user/modify',
        method: 'post',
        data
    });

export const reqAddNews = (data) =>
    requester({
        url: '/news/create',
        method: 'post',
        data
    });
